export default class jingdutiao extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    owner=this.owner as Laya.Sprite;
    jinyong1=false;
    constructor() { super(); }
    onAwake(){
            Laya.stage.on("jinyong1",this,function(){this.jinyong1=true})
            Laya.stage.on("homepege",this,function(){this.jinyong1=false})
            Laya.stage.on("start",this,function(){this.owner.value=0;})
        Laya.stage.on("+",this,this.zhen);
    }

    zhen()
    {
        if(!this.jinyong1){
             if (this.owner.value < 1)
        this.owner.value += 0.05;
            else if(this.owner.value == 1){
        Laya.stage.event("gamer2");
        this.owner.visible=false;
    }
        }
   
    }
    }
    